
/**
 * IntelAjax
 *
 * @version $Id:$
 */
function IntelAjax()
{
	this.getHttpResponse = function()
	{
		this.xmlHttp;

	  	try
	    {
	    	this.xmlHttp= new XMLHttpRequest();
	    }
		catch (e)
	    {
	    	try
	      	{
	      		this.xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
	      	}
	    	catch (e)
	      	{
	      		try
	        	{
	        		this.xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	        	}
	      		catch (e)
	        	{
	        		alert("Your browser does not support AJAX!");
	        		return false;
	        	}
	      	}
	    }	
	}
	
	this.post = function(sModule, sFunction, sExtra)
	{
		this.getHttpResponse();
	    
	    sUrl = sHome + 'design/static/ajax.php';  
	    sParams = '&intelajax[function]=' + sFunction + '&intelajax[module]=' + sModule + '';

	    /*
	    if ( sExtra )
		{
			aExtras = sExtra.split("&");
			foreach(aExtras as sNewExtra)
			{
				sParams += '&intejajax[param]=' + sExtra;
			}
		}
		*/

	    this.xmlHttp.open("POST", sUrl, true);
	    this.xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	    this.xmlHttp.setRequestHeader("Content-length", sParams.length);
	    this.xmlHttp.setRequestHeader("Connection", "close");
		this.xmlHttp.send(sParams);
	}
}

var oAjax = new IntelAjax();